Drop the CRLF conversion and cover the CRLF path with a fixture - #228
Merged
Conversation
Converting the shipped examples buys nothing measurable: the rulesets parse identically either way, the tool already keeps the line endings a user's own file came with, and BeamNG ships 150 LF files of 4943 itself. Meanwhile no fixture had a carriage return in it, so the suite never exercised CRLF on a format whose real files mostly are.
Reading the previous output back to decide the line ending was a way of managing what git now manages through .gitattributes. The conversion itself stays: the formatter returns whatever the source used, and two fender fixtures have CRLF sources.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Formatting a
.jbeamfile already keeps whatever line endings that file came with, so converting the shipped examples at release time changes nothing a user sees. The script had also drifted from what the packaging step copies: it converted a directory that ships nowhere and left the rulesets that go into both the installer and the zip alone.What the LF-only fixtures did cost is coverage. Nothing in the suite contained a carriage return, on a format whose real files are 97 per cent CRLF, and the parser has had a CRLF-specific bug in a block comment before. One fixture now carries CRLF deliberately, pinned as binary so no checkout normalises it away, and the spec asserts that the same file read both ways parses to the same tree and that the fixture still has its carriage returns.
.gitattributesarrives with it, which the repository has never had.dump_aststops reading its previous output back to pick a line ending and always writes LF. CLAUDE.md still described a source directory and a dev flag that no longer exist, and both are gone.